#pragma once

// Copyright (c) 2010 Manuel Peinado Gallego <manuel.peinado@gmail.com>
// Distributed under the MIT license

// WorldView.h : interface of the WorldView class
//

#include "SmartEnum.h"
#include "Pickable.h"
#include "World.h"
#include "Ray.h"
#include <alg3d/gx.h>
#include <set>


// ----------------------------------------------------------------------------
// Class "WorldView"
// ----------------------------------------------------------------------------
// ----------------------------------------------------------------------------
//
// ----------------------------------------------------------------------------


class WorldView : public SelectionChangeListener, 
                  public NodeListener,
                  public MaterialListener
{
public:

    WorldView();
    virtual ~WorldView();

    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

    World* getWorld();
    void setWorld(World* world);

    // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

protected:

    // -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  

    virtual void onWorldChanged(World* newWorld) {}

    // -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  

    // The world this view looks into
    World* m_world;

};

